package com.yita.demo02_project;

import com.yita.demo02_project.controller.Menu;

import java.io.IOException;

public class Client {
    public static void main(String[] args) throws IOException {
        Menu m=new Menu();

        boolean flag=true;
        while(flag){
            int choice=m.showMenu();
            switch (choice){
                case 1:
                    //显示库存列表
                    m.showFruitList();
                    break;
                case 2:
                    m.addFruit();
                    break;
                case 3:
                    m.showFruitInfo();
                    break;
                case 4:
                    m.delFruit();
                    break;
                case 5:
                    flag=m.exit();
                    break;
                default:
                    System.out.println("你不按套路出牌！");
                    break;
            }
        }
        System.out.println("再见");
    }
}
